package exception;


//主要释放资源
public class FinallyDemo {
    public static void main(String[] args) {
        System.out.println("启动了");

        try{
            String str = "abc";
//            String str = null;
            System.out.println(str.length());
            return;
        }catch (Exception e){
            System.out.println("出错了");
        }finally {
            System.out.println("finally块");
        }

        System.out.println("结束了");
    }
}
